Skip to content

Fix/stale-applirank-env-vars#58

Merged
JoachimLK merged 2 commits into
mainfrom
fix/stale-applirank-env-vars
Feb 27, 2026
Merged

Fix/stale-applirank-env-vars#58
JoachimLK merged 2 commits into
mainfrom
fix/stale-applirank-env-vars

Conversation

@JoachimLK
Copy link
Copy Markdown
Contributor

@JoachimLK JoachimLK commented Feb 27, 2026

Summary

  • What does this PR change?
  • Why is this needed?

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Chore

Validation

  • I tested locally
  • I added/updated relevant documentation
  • I verified multi-tenant scoping and auth behavior for affected API paths

DCO

  • All commits in this PR are signed off (Signed-off-by) via git commit -s

Summary by CodeRabbit

  • Bug Fixes

    • Added runtime validation for email configuration to prevent stale domain usage, with automatic fallback to a default email address.
  • Chores

    • Enhanced demo data seeding to automatically clean up legacy records before initialization, ensuring data consistency.

…v.example

Closes #57

- Add LIVE_DEMO_EMAIL=demo@reqcore.com — missing entirely from .env.example,
  meaning operators had no guidance when renaming the domain. Its absence let
  a stale DEMO_EMAIL=demo@applirank.com override the correct fallback.
- Fix GITHUB_FEEDBACK_REPO example: reqcore/reqcore → reqcore-inc/reqcore

Production env vars to update in Railway:
  LIVE_DEMO_EMAIL=demo@reqcore.com    (was: missing)
  DEMO_ORG_SLUG=reqcore-demo          (was: applirank-demo — also bypasses demo write-guard)
  GITHUB_FEEDBACK_REPO=reqcore-inc/reqcore  (was: applirank/applirank)
  BETTER_AUTH_URL=https://reqcore.com (was: https://applirank.com)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f141f9 and 1a3aa32.

📒 Files selected for processing (2)
  • nuxt.config.ts
  • server/scripts/seed.ts

📝 Walkthrough

Walkthrough

This PR introduces a runtime guard for the demo email configuration in Nuxt and adds legacy cleanup logic to the seed script. The config now validates the demo email against stale applirank.com domains, while the seed script removes any pre-existing legacy demo organization and user records before seeding.

Changes

Cohort / File(s) Summary
Configuration Guard
nuxt.config.ts
Updated liveDemoEmail from a static string to an IIFE that computes the email from environment variables and falls back to demo@reqcore.com if the result ends with @applirank.com, logging a warning.
Legacy Cleanup Logic
server/scripts/seed.ts
Added legacy cleanup block that detects and removes stale demo organization and user records (matched by LEGACY_ORG_SLUG and LEGACY_DEMO_EMAIL) before proceeding with the demo seed flow.

Possibly Related Issues

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes


🐰 A hop through time, we skip the old,
Applirank's demo now grows cold,
With guards and cleanup, fresh and new,
The seed rings true—reqcore shines through! 🌱✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is an unfilled template with all checkboxes unchecked and placeholder text unanswered, lacking any substantive summary or implementation details. Fill in the Summary section with what changed and why, select the appropriate Type of change, and mark relevant Validation items as completed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix/stale-applirank-env-vars' is directly related to the changeset, which addresses stale environment variables from applirank.com domain.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/stale-applirank-env-vars

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JoachimLK JoachimLK merged commit d9cf3ae into main Feb 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant